﻿using System;
namespace Producers.Liiklusregister.Xtee.Riik.Ee.Producer.Liiklusregister {
    
    
    [global::Xtee.Core.Attributes.XmlTypeAttribute(Name="vlaev_vastus_laevaandmed", Namespace="http://producers.liiklusregister.xtee.riik.ee/producer/liiklusregister", Target=typeof(VlaevVastusLaevaandmed))]
    public class VlaevVastusLaevaandmedSerializer : global::Xtee.Core.Types.AbstractXteeSerializable {
        
        protected IVlaevVastusLaevaandmed clazz;
        
        public VlaevVastusLaevaandmedSerializer(IVlaevVastusLaevaandmed clazz) {
            this.clazz = clazz;
        }
        
        public override void WriteXml(global::Xtee.Core.IXteeXmlWriter Writer) {
            base.WriteXml(Writer);
            Writer.WriteStartElement("laeva_regnr");
            if (clazz.LaevaRegnr!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.LaevaRegnr))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : LaevaRegnr");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("laeva_tahis");
            if (clazz.LaevaTahis!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.LaevaTahis))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : LaevaTahis");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("laeva_nimi");
            if (clazz.LaevaNimi!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.LaevaNimi))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : LaevaNimi");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("ehitusaasta");
            if (clazz.Ehitusaasta!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Ehitusaasta))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Ehitusaasta");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("hin_kood");
            if (clazz.HinKood!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.HinKood))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : HinKood");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("ce_MARGIS");
            if (clazz.CeMARGIS!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.CeMARGIS))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : CeMARGIS");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("regt");
            if (clazz.Regt!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Regt))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Regt");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("regt_kuup");
            if (clazz.RegtKuup!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.RegtKuup))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : RegtKuup");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("kehtiv_kuni");
            if (clazz.KehtivKuni!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KehtivKuni))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KehtivKuni");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("regt_byroo");
            if (clazz.RegtByroo!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.RegtByroo))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : RegtByroo");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("kateg_nm");
            if (clazz.KategNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.KategNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : KategNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("id_kood");
            if (clazz.IdKood!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.IdKood))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : IdKood");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("liik_nm");
            if (clazz.LiikNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.LiikNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : LiikNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("tyyp_nm");
            if (clazz.TyypNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TyypNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TyypNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("tyyplisa_nm");
            if (clazz.TyyplisaNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.TyyplisaNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : TyyplisaNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mark");
            if (clazz.Mark!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Mark))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Mark");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mudel");
            if (clazz.Mudel!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Mudel))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Mudel");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("material_nm");
            if (clazz.MaterialNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.MaterialNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : MaterialNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("pikkus");
            if (clazz.Pikkus!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Pikkus))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Pikkus");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("laius");
            if (clazz.Laius!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Laius))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Laius");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("syvis");
            if (clazz.Syvis!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Syvis))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Syvis");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("lubatud");
            if (clazz.Lubatud!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Lubatud))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Lubatud");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("kandej");
            if (clazz.Kandej!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Kandej))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Kandej");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mahtuvus");
            if (clazz.Mahtuvus!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Mahtuvus))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Mahtuvus");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("tyhimass");
            if (clazz.Tyhimass!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Tyhimass))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Tyhimass");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mootor_nm");
            if (clazz.MootorNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.MootorNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : MootorNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mootor_arv");
            if (clazz.MootorArv!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.MootorArv))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : MootorArv");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("voimsus");
            if (clazz.Voimsus!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Voimsus))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Voimsus");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mootnr_1");
            if (clazz.Mootnr1!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Mootnr1))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Mootnr1");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mootnr_2");
            if (clazz.Mootnr2!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Mootnr2))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Mootnr2");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("mootnr_3");
            if (clazz.Mootnr3!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Mootnr3))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Mootnr3");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("purjepind");
            if (clazz.Purjepind!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Purjepind))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Purjepind");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("riik_nm");
            if (clazz.RiikNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.RiikNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : RiikNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik");
            if (clazz.Omanik!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Omanik))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Omanik");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik2");
            if (clazz.Omanik2!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Omanik2))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Omanik2");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_kood");
            if (clazz.OmanikKood!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OmanikKood))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikKood");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_asukoht");
            if (clazz.OmanikAsukoht!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OmanikAsukoht))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikAsukoht");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_aadress");
            if (clazz.OmanikAadress!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OmanikAadress))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikAadress");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_indeks");
            if (clazz.OmanikIndeks!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OmanikIndeks))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikIndeks");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_epost");
            if (clazz.OmanikEpost!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OmanikEpost))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikEpost");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_tel");
            if (clazz.OmanikTel!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OmanikTel))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikTel");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_riik");
            if (clazz.OmanikRiik!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OmanikRiik))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikRiik");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("omanik_type");
            if (clazz.OmanikType!=null) {
                Writer.WriteTypeAttribute("http://producers.liiklusregister.xtee.riik.ee/producer/liiklusregister", "t_omanik");
                Writer.WriteString(clazz.OmanikType.ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OmanikType");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav");
            if (clazz.Vastutav!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Vastutav))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Vastutav");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav2");
            if (clazz.Vastutav2!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Vastutav2))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Vastutav2");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_kood");
            if (clazz.VastutavKood!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.VastutavKood))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavKood");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_asukoht");
            if (clazz.VastutavAsukoht!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.VastutavAsukoht))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavAsukoht");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_aadress");
            if (clazz.VastutavAadress!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.VastutavAadress))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavAadress");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_indeks");
            if (clazz.VastutavIndeks!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.VastutavIndeks))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavIndeks");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_epost");
            if (clazz.VastutavEpost!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.VastutavEpost))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavEpost");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_tel");
            if (clazz.VastutavTel!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.VastutavTel))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavTel");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_riik");
            if (clazz.VastutavRiik!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.VastutavRiik))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavRiik");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("vastutav_type");
            if (clazz.VastutavType!=null) {
                Writer.WriteTypeAttribute("http://producers.liiklusregister.xtee.riik.ee/producer/liiklusregister", "t_omanik");
                Writer.WriteString(clazz.VastutavType.ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : VastutavType");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("olek_nm");
            if (clazz.OlekNm!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.OlekNm))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : OlekNm");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("spiirkond");
            if (clazz.Spiirkond!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Spiirkond))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Spiirkond");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("juurdeehitus");
            if (clazz.Juurdeehitus!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Juurdeehitus))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Juurdeehitus");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("piirangud");
            if (clazz.Piirangud!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Piirangud))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Piirangud");
            }
            Writer.WriteEndElement();
            Writer.WriteStartElement("isikud");
            if (clazz.Isikud!=null) {
                Writer.WriteTypeAttribute("http://www.w3.org/2001/XMLSchema", "string");
                Writer.WriteString(new global::Xtee.Core.Schema.XsdString(((string)(clazz.Isikud))).ToString());
            }
            else {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException("Nullable is not allowed for element : Isikud");
            }
            Writer.WriteEndElement();
        }
        
        public override void ReadXml(global::Xtee.Core.IXteeXmlReader Reader) {
            base.ReadXml(Reader);
        START:
            if ((Reader.LocalName == "laeva_regnr")) {
                goto laeva_regnr;
            }
            else {
                if ((Reader.LocalName == "laeva_tahis")) {
                    goto laeva_tahis;
                }
                else {
                    if ((Reader.LocalName == "laeva_nimi")) {
                        goto laeva_nimi;
                    }
                    else {
                        if ((Reader.LocalName == "ehitusaasta")) {
                            goto ehitusaasta;
                        }
                        else {
                            if ((Reader.LocalName == "hin_kood")) {
                                goto hin_kood;
                            }
                            else {
                                if ((Reader.LocalName == "ce_MARGIS")) {
                                    goto ce_MARGIS;
                                }
                                else {
                                    if ((Reader.LocalName == "regt")) {
                                        goto regt;
                                    }
                                    else {
                                        if ((Reader.LocalName == "regt_kuup")) {
                                            goto regt_kuup;
                                        }
                                        else {
                                            if ((Reader.LocalName == "kehtiv_kuni")) {
                                                goto kehtiv_kuni;
                                            }
                                            else {
                                                if ((Reader.LocalName == "regt_byroo")) {
                                                    goto regt_byroo;
                                                }
                                                else {
                                                    if ((Reader.LocalName == "kateg_nm")) {
                                                        goto kateg_nm;
                                                    }
                                                    else {
                                                        if ((Reader.LocalName == "id_kood")) {
                                                            goto id_kood;
                                                        }
                                                        else {
                                                            if ((Reader.LocalName == "liik_nm")) {
                                                                goto liik_nm;
                                                            }
                                                            else {
                                                                if ((Reader.LocalName == "tyyp_nm")) {
                                                                    goto tyyp_nm;
                                                                }
                                                                else {
                                                                    if ((Reader.LocalName == "tyyplisa_nm")) {
                                                                        goto tyyplisa_nm;
                                                                    }
                                                                    else {
                                                                        if ((Reader.LocalName == "mark")) {
                                                                            goto mark;
                                                                        }
                                                                        else {
                                                                            if ((Reader.LocalName == "mudel")) {
                                                                                goto mudel;
                                                                            }
                                                                            else {
                                                                                if ((Reader.LocalName == "material_nm")) {
                                                                                    goto material_nm;
                                                                                }
                                                                                else {
                                                                                    if ((Reader.LocalName == "pikkus")) {
                                                                                        goto pikkus;
                                                                                    }
                                                                                    else {
                                                                                        if ((Reader.LocalName == "laius")) {
                                                                                            goto laius;
                                                                                        }
                                                                                        else {
                                                                                            if ((Reader.LocalName == "syvis")) {
                                                                                                goto syvis;
                                                                                            }
                                                                                            else {
                                                                                                if ((Reader.LocalName == "lubatud")) {
                                                                                                    goto lubatud;
                                                                                                }
                                                                                                else {
                                                                                                    if ((Reader.LocalName == "kandej")) {
                                                                                                        goto kandej;
                                                                                                    }
                                                                                                    else {
                                                                                                        if ((Reader.LocalName == "mahtuvus")) {
                                                                                                            goto mahtuvus;
                                                                                                        }
                                                                                                        else {
                                                                                                            if ((Reader.LocalName == "tyhimass")) {
                                                                                                                goto tyhimass;
                                                                                                            }
                                                                                                            else {
                                                                                                                if ((Reader.LocalName == "mootor_nm")) {
                                                                                                                    goto mootor_nm;
                                                                                                                }
                                                                                                                else {
                                                                                                                    if ((Reader.LocalName == "mootor_arv")) {
                                                                                                                        goto mootor_arv;
                                                                                                                    }
                                                                                                                    else {
                                                                                                                        if ((Reader.LocalName == "voimsus")) {
                                                                                                                            goto voimsus;
                                                                                                                        }
                                                                                                                        else {
                                                                                                                            if ((Reader.LocalName == "mootnr_1")) {
                                                                                                                                goto mootnr_1;
                                                                                                                            }
                                                                                                                            else {
                                                                                                                                if ((Reader.LocalName == "mootnr_2")) {
                                                                                                                                    goto mootnr_2;
                                                                                                                                }
                                                                                                                                else {
                                                                                                                                    if ((Reader.LocalName == "mootnr_3")) {
                                                                                                                                        goto mootnr_3;
                                                                                                                                    }
                                                                                                                                    else {
                                                                                                                                        if ((Reader.LocalName == "purjepind")) {
                                                                                                                                            goto purjepind;
                                                                                                                                        }
                                                                                                                                        else {
                                                                                                                                            if ((Reader.LocalName == "riik_nm")) {
                                                                                                                                                goto riik_nm;
                                                                                                                                            }
                                                                                                                                            else {
                                                                                                                                                if ((Reader.LocalName == "omanik")) {
                                                                                                                                                    goto omanik;
                                                                                                                                                }
                                                                                                                                                else {
                                                                                                                                                    if ((Reader.LocalName == "omanik2")) {
                                                                                                                                                        goto omanik2;
                                                                                                                                                    }
                                                                                                                                                    else {
                                                                                                                                                        if ((Reader.LocalName == "omanik_kood")) {
                                                                                                                                                            goto omanik_kood;
                                                                                                                                                        }
                                                                                                                                                        else {
                                                                                                                                                            if ((Reader.LocalName == "omanik_asukoht")) {
                                                                                                                                                                goto omanik_asukoht;
                                                                                                                                                            }
                                                                                                                                                            else {
                                                                                                                                                                if ((Reader.LocalName == "omanik_aadress")) {
                                                                                                                                                                    goto omanik_aadress;
                                                                                                                                                                }
                                                                                                                                                                else {
                                                                                                                                                                    if ((Reader.LocalName == "omanik_indeks")) {
                                                                                                                                                                        goto omanik_indeks;
                                                                                                                                                                    }
                                                                                                                                                                    else {
                                                                                                                                                                        if ((Reader.LocalName == "omanik_epost")) {
                                                                                                                                                                            goto omanik_epost;
                                                                                                                                                                        }
                                                                                                                                                                        else {
                                                                                                                                                                            if ((Reader.LocalName == "omanik_tel")) {
                                                                                                                                                                                goto omanik_tel;
                                                                                                                                                                            }
                                                                                                                                                                            else {
                                                                                                                                                                                if ((Reader.LocalName == "omanik_riik")) {
                                                                                                                                                                                    goto omanik_riik;
                                                                                                                                                                                }
                                                                                                                                                                                else {
                                                                                                                                                                                    if ((Reader.LocalName == "omanik_type")) {
                                                                                                                                                                                        goto omanik_type;
                                                                                                                                                                                    }
                                                                                                                                                                                    else {
                                                                                                                                                                                        if ((Reader.LocalName == "vastutav")) {
                                                                                                                                                                                            goto vastutav;
                                                                                                                                                                                        }
                                                                                                                                                                                        else {
                                                                                                                                                                                            if ((Reader.LocalName == "vastutav2")) {
                                                                                                                                                                                                goto vastutav2;
                                                                                                                                                                                            }
                                                                                                                                                                                            else {
                                                                                                                                                                                                if ((Reader.LocalName == "vastutav_kood")) {
                                                                                                                                                                                                    goto vastutav_kood;
                                                                                                                                                                                                }
                                                                                                                                                                                                else {
                                                                                                                                                                                                    if ((Reader.LocalName == "vastutav_asukoht")) {
                                                                                                                                                                                                        goto vastutav_asukoht;
                                                                                                                                                                                                    }
                                                                                                                                                                                                    else {
                                                                                                                                                                                                        if ((Reader.LocalName == "vastutav_aadress")) {
                                                                                                                                                                                                            goto vastutav_aadress;
                                                                                                                                                                                                        }
                                                                                                                                                                                                        else {
                                                                                                                                                                                                            if ((Reader.LocalName == "vastutav_indeks")) {
                                                                                                                                                                                                                goto vastutav_indeks;
                                                                                                                                                                                                            }
                                                                                                                                                                                                            else {
                                                                                                                                                                                                                if ((Reader.LocalName == "vastutav_epost")) {
                                                                                                                                                                                                                    goto vastutav_epost;
                                                                                                                                                                                                                }
                                                                                                                                                                                                                else {
                                                                                                                                                                                                                    if ((Reader.LocalName == "vastutav_tel")) {
                                                                                                                                                                                                                        goto vastutav_tel;
                                                                                                                                                                                                                    }
                                                                                                                                                                                                                    else {
                                                                                                                                                                                                                        if ((Reader.LocalName == "vastutav_riik")) {
                                                                                                                                                                                                                            goto vastutav_riik;
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                        else {
                                                                                                                                                                                                                            if ((Reader.LocalName == "vastutav_type")) {
                                                                                                                                                                                                                                goto vastutav_type;
                                                                                                                                                                                                                            }
                                                                                                                                                                                                                            else {
                                                                                                                                                                                                                                if ((Reader.LocalName == "olek_nm")) {
                                                                                                                                                                                                                                    goto olek_nm;
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                else {
                                                                                                                                                                                                                                    if ((Reader.LocalName == "spiirkond")) {
                                                                                                                                                                                                                                        goto spiirkond;
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    else {
                                                                                                                                                                                                                                        if ((Reader.LocalName == "juurdeehitus")) {
                                                                                                                                                                                                                                            goto juurdeehitus;
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                        else {
                                                                                                                                                                                                                                            if ((Reader.LocalName == "piirangud")) {
                                                                                                                                                                                                                                                goto piirangud;
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                            else {
                                                                                                                                                                                                                                                if ((Reader.LocalName == "isikud")) {
                                                                                                                                                                                                                                                    goto isikud;
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                                else {
                                                                                                                                                                                                                                                    return;
                                                                                                                                                                                                                                                }
                                                                                                                                                                                                                                            }
                                                                                                                                                                                                                                        }
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                }
                                                                                                                                                                                                                            }
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                    }
                                                                                                                                                                                                                }
                                                                                                                                                                                                            }
                                                                                                                                                                                                        }
                                                                                                                                                                                                    }
                                                                                                                                                                                                }
                                                                                                                                                                                            }
                                                                                                                                                                                        }
                                                                                                                                                                                    }
                                                                                                                                                                                }
                                                                                                                                                                            }
                                                                                                                                                                        }
                                                                                                                                                                    }
                                                                                                                                                                }
                                                                                                                                                            }
                                                                                                                                                        }
                                                                                                                                                    }
                                                                                                                                                }
                                                                                                                                            }
                                                                                                                                        }
                                                                                                                                    }
                                                                                                                                }
                                                                                                                            }
                                                                                                                        }
                                                                                                                    }
                                                                                                                }
                                                                                                            }
                                                                                                        }
                                                                                                    }
                                                                                                }
                                                                                            }
                                                                                        }
                                                                                    }
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        laeva_regnr:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>laeva_regnr");
            }
            clazz.LaevaRegnr = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("laeva_regnr")).Value;
            goto START;
        laeva_tahis:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>laeva_tahis");
            }
            clazz.LaevaTahis = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("laeva_tahis")).Value;
            goto START;
        laeva_nimi:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>laeva_nimi");
            }
            clazz.LaevaNimi = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("laeva_nimi")).Value;
            goto START;
        ehitusaasta:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>ehitusaasta");
            }
            clazz.Ehitusaasta = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ehitusaasta")).Value;
            goto START;
        hin_kood:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>hin_kood");
            }
            clazz.HinKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("hin_kood")).Value;
            goto START;
        ce_MARGIS:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>ce_MARGIS");
            }
            clazz.CeMARGIS = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("ce_MARGIS")).Value;
            goto START;
        regt:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>regt");
            }
            clazz.Regt = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("regt")).Value;
            goto START;
        regt_kuup:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>regt_kuup");
            }
            clazz.RegtKuup = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("regt_kuup")).Value;
            goto START;
        kehtiv_kuni:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>kehtiv_kuni");
            }
            clazz.KehtivKuni = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("kehtiv_kuni")).Value;
            goto START;
        regt_byroo:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>regt_byroo");
            }
            clazz.RegtByroo = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("regt_byroo")).Value;
            goto START;
        kateg_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>kateg_nm");
            }
            clazz.KategNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("kateg_nm")).Value;
            goto START;
        id_kood:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>id_kood");
            }
            clazz.IdKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("id_kood")).Value;
            goto START;
        liik_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>liik_nm");
            }
            clazz.LiikNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("liik_nm")).Value;
            goto START;
        tyyp_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>tyyp_nm");
            }
            clazz.TyypNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("tyyp_nm")).Value;
            goto START;
        tyyplisa_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>tyyplisa_nm");
            }
            clazz.TyyplisaNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("tyyplisa_nm")).Value;
            goto START;
        mark:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mark");
            }
            clazz.Mark = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mark")).Value;
            goto START;
        mudel:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mudel");
            }
            clazz.Mudel = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mudel")).Value;
            goto START;
        material_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>material_nm");
            }
            clazz.MaterialNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("material_nm")).Value;
            goto START;
        pikkus:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>pikkus");
            }
            clazz.Pikkus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("pikkus")).Value;
            goto START;
        laius:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>laius");
            }
            clazz.Laius = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("laius")).Value;
            goto START;
        syvis:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>syvis");
            }
            clazz.Syvis = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("syvis")).Value;
            goto START;
        lubatud:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>lubatud");
            }
            clazz.Lubatud = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("lubatud")).Value;
            goto START;
        kandej:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>kandej");
            }
            clazz.Kandej = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("kandej")).Value;
            goto START;
        mahtuvus:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mahtuvus");
            }
            clazz.Mahtuvus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mahtuvus")).Value;
            goto START;
        tyhimass:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>tyhimass");
            }
            clazz.Tyhimass = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("tyhimass")).Value;
            goto START;
        mootor_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mootor_nm");
            }
            clazz.MootorNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mootor_nm")).Value;
            goto START;
        mootor_arv:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mootor_arv");
            }
            clazz.MootorArv = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mootor_arv")).Value;
            goto START;
        voimsus:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>voimsus");
            }
            clazz.Voimsus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("voimsus")).Value;
            goto START;
        mootnr_1:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mootnr_1");
            }
            clazz.Mootnr1 = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mootnr_1")).Value;
            goto START;
        mootnr_2:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mootnr_2");
            }
            clazz.Mootnr2 = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mootnr_2")).Value;
            goto START;
        mootnr_3:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>mootnr_3");
            }
            clazz.Mootnr3 = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("mootnr_3")).Value;
            goto START;
        purjepind:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>purjepind");
            }
            clazz.Purjepind = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("purjepind")).Value;
            goto START;
        riik_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>riik_nm");
            }
            clazz.RiikNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("riik_nm")).Value;
            goto START;
        omanik:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik");
            }
            clazz.Omanik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik")).Value;
            goto START;
        omanik2:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik2");
            }
            clazz.Omanik2 = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik2")).Value;
            goto START;
        omanik_kood:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_kood");
            }
            clazz.OmanikKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik_kood")).Value;
            goto START;
        omanik_asukoht:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_asukoht");
            }
            clazz.OmanikAsukoht = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik_asukoht")).Value;
            goto START;
        omanik_aadress:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_aadress");
            }
            clazz.OmanikAadress = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik_aadress")).Value;
            goto START;
        omanik_indeks:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_indeks");
            }
            clazz.OmanikIndeks = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik_indeks")).Value;
            goto START;
        omanik_epost:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_epost");
            }
            clazz.OmanikEpost = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik_epost")).Value;
            goto START;
        omanik_tel:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_tel");
            }
            clazz.OmanikTel = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik_tel")).Value;
            goto START;
        omanik_riik:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_riik");
            }
            clazz.OmanikRiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("omanik_riik")).Value;
            goto START;
        omanik_type:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>omanik_type");
            }
            clazz.OmanikType = new global::Producers.Liiklusregister.Xtee.Riik.Ee.Producer.Liiklusregister.TOmanik(Reader.ReadElementString("omanik_type"));
            goto START;
        vastutav:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav");
            }
            clazz.Vastutav = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav")).Value;
            goto START;
        vastutav2:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav2");
            }
            clazz.Vastutav2 = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav2")).Value;
            goto START;
        vastutav_kood:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_kood");
            }
            clazz.VastutavKood = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav_kood")).Value;
            goto START;
        vastutav_asukoht:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_asukoht");
            }
            clazz.VastutavAsukoht = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav_asukoht")).Value;
            goto START;
        vastutav_aadress:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_aadress");
            }
            clazz.VastutavAadress = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav_aadress")).Value;
            goto START;
        vastutav_indeks:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_indeks");
            }
            clazz.VastutavIndeks = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav_indeks")).Value;
            goto START;
        vastutav_epost:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_epost");
            }
            clazz.VastutavEpost = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav_epost")).Value;
            goto START;
        vastutav_tel:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_tel");
            }
            clazz.VastutavTel = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav_tel")).Value;
            goto START;
        vastutav_riik:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_riik");
            }
            clazz.VastutavRiik = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("vastutav_riik")).Value;
            goto START;
        vastutav_type:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>vastutav_type");
            }
            clazz.VastutavType = new global::Producers.Liiklusregister.Xtee.Riik.Ee.Producer.Liiklusregister.TOmanik(Reader.ReadElementString("vastutav_type"));
            goto START;
        olek_nm:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>olek_nm");
            }
            clazz.OlekNm = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("olek_nm")).Value;
            goto START;
        spiirkond:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>spiirkond");
            }
            clazz.Spiirkond = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("spiirkond")).Value;
            goto START;
        juurdeehitus:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>juurdeehitus");
            }
            clazz.Juurdeehitus = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("juurdeehitus")).Value;
            goto START;
        piirangud:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>piirangud");
            }
            clazz.Piirangud = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("piirangud")).Value;
            goto START;
        isikud:
            if (Reader.IsElementNil()) {
                throw new global::Xtee.Core.Exceptions.NillableNotAllowedException(">>vlaev_vastus_laevaandmed>isikud");
            }
            clazz.Isikud = new global::Xtee.Core.Schema.XsdString(Reader.ReadElementString("isikud")).Value;
            goto START;
        }
    }
}
